package com.ruoyi.wechat.service.impl;

import java.util.List;
import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wechat.mapper.CampSiteMapper;
import com.ruoyi.wechat.domain.CampSite;
import com.ruoyi.wechat.service.ICampSiteService;

/**
 * 营位管理Service业务层处理
 * 
 * @author mu
 * @date 2024-10-31
 */
@Service
public class CampSiteServiceImpl implements ICampSiteService 
{
    @Autowired
    private CampSiteMapper campSiteMapper;

    /**
     * 查询营位管理
     * 
     * @param campsiteId 营位管理主键
     * @return 营位管理
     */
    @Override
    public CampSite selectCampSiteByCampsiteId(String campsiteId)
    {
        return campSiteMapper.selectCampSiteByCampsiteId(campsiteId);
    }

    /**
     * 查询营位管理列表
     * 
     * @param campSite 营位管理
     * @return 营位管理
     */
    @Override
    public List<CampSite> selectCampSiteList(CampSite campSite)
    {
        return campSiteMapper.selectCampSiteList(campSite);
    }

    /**
     * 新增营位管理
     * 
     * @param campSite 营位管理
     * @return 结果
     */
    @Override
    public int insertCampSite(CampSite campSite)
    {
        campSite.setCampsiteId(UUID.randomUUID().toString());
        return campSiteMapper.insertCampSite(campSite);
    }

    /**
     * 修改营位管理
     * 
     * @param campSite 营位管理
     * @return 结果
     */
    @Override
    public int updateCampSite(CampSite campSite)
    {
        return campSiteMapper.updateCampSite(campSite);
    }

    /**
     * 批量删除营位管理
     * 
     * @param campsiteIds 需要删除的营位管理主键
     * @return 结果
     */
    @Override
    public int deleteCampSiteByCampsiteIds(String[] campsiteIds)
    {
        return campSiteMapper.deleteCampSiteByCampsiteIds(campsiteIds);
    }

    /**
     * 删除营位管理信息
     * 
     * @param campsiteId 营位管理主键
     * @return 结果
     */
    @Override
    public int deleteCampSiteByCampsiteId(String campsiteId)
    {
        return campSiteMapper.deleteCampSiteByCampsiteId(campsiteId);
    }
}
